package com.xhs.main.service.rsb.impl;

import com.xhs.main.dao.rsb.RsbShowMoneyDao;
import com.xhs.main.entity.rsb.RsbShowMoney;
import com.xhs.main.service.rsb.RsbShowMoneyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author author
 * @create 2020-10-25-19:33
 */
@Service
public class RsbShowMoneyServiceImpl implements RsbShowMoneyService {
    @Autowired
    RsbShowMoneyDao rsbShowMoneyDao;

    @Override
    public void insertShowMoney(RsbShowMoney rsbShowMoney) {
        rsbShowMoneyDao.insertShowMoney(rsbShowMoney);
    }

    @Override
    public List<RsbShowMoney> selectAllShowMoney() {
        List<RsbShowMoney> rsbShowMonies = rsbShowMoneyDao.selectAllShowMoney();
        return rsbShowMonies;
    }

    @Override
    public void updateShowMoney(RsbShowMoney rsbShowMoney, String userNum) {
        rsbShowMoneyDao.updateShowMoney(rsbShowMoney,userNum);
    }

    @Override
    public void deleteShowMonry(String rsbShNum) {
        rsbShowMoneyDao.deleteShowMonry(rsbShNum);
    }

    @Override
    public void updateDate(String date, String rsbShNum) {
        rsbShowMoneyDao.updateDate(date,rsbShNum);
    }

    /*财务部添加*/
    @Override
    public List<RsbShowMoney> getAllShowMoneyByLimit(Integer page,Integer limit) {
        List<RsbShowMoney> money = rsbShowMoneyDao.selectAllShowMoneyByLimit(page, limit);
        return money;
    }

    /*财务部添加*/
    @Override
    public List<RsbShowMoney> getByCondition(String userNum, String userName, Integer page, Integer limit) {
        List<RsbShowMoney> rsbShowMonies = rsbShowMoneyDao.selectByCondition(userNum, userName, page, limit);
        return rsbShowMonies;
    }

}
